Skip to content

feat: support endpoint-specific request headers#61

Open
tris203 wants to merge 1 commit into
covenanttechnologysolutions:masterfrom
tris203:review/endpoint-request-headers
Open

feat: support endpoint-specific request headers#61
tris203 wants to merge 1 commit into
covenanttechnologysolutions:masterfrom
tris203:review/endpoint-request-headers

Conversation

@tris203

@tris203 tris203 commented May 29, 2026

Copy link
Copy Markdown

Changes

Adds support for endpoint-specific request headers in generated Manage API requests, including the required x-cw-usertype: member header for member token creation.

  • Added headers to RequestOptions.
  • Passed custom headers through makeRequest and Manage request execution.
  • Updated multipart requests to merge custom headers with multipart Content-Type.
  • Updated the generator to emit the member user type header for POST /system/members/{memberIdentifier}/tokens.
  • Added tests for header forwarding and binary download response types.

Why

ConnectWise Manage requires endpoint-specific headers for certain operations, such as creating member tokens. Without forwarding custom headers through the request pipeline, generated API methods could not satisfy those endpoint requirements. This change enables those headers while preserving existing request behavior.

- Add `headers` field to `RequestOptions` for endpoint-specific headers.
- Pass headers through `makeRequest` and API classes.
- Ensure multipart requests merge custom headers with Content-Type.
- Add `x-cw-usertype: member` header for member token creation endpoint.
- Update tests to verify header forwarding and binary response types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant